package com.wish.g01.financial.controller;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wish.g01.base.entity.JrProduct;
import com.wish.g01.financial.common.AjaxResult;
import com.wish.g01.financial.common.FactoringApplicaVo;
import com.wish.g01.financial.dto.FactoringApplicaDto;
import com.wish.g01.financial.service.RentInstallmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 租约查询
 * 这个类的作者是13536
 * 开发日期:2022/5/31
 **/
@RestController
@RequestMapping("factoringApplica")
public class FactoringApplicaController {

    @Autowired
    RentInstallmentService RentInstallmentService;
    @GetMapping("list")
    public AjaxResult getList(FactoringApplicaDto factoringApplicaDto){
        PageHelper.startPage(factoringApplicaDto.getPageNum(),factoringApplicaDto.getPageSize());
        List<FactoringApplicaVo> getlist = RentInstallmentService.getlist(factoringApplicaDto);
        PageInfo<FactoringApplicaVo> pageInfo = new PageInfo<>(getlist);
        return AjaxResult.success(pageInfo);
    }

    /**
     * 申请详情
     * @return
     */
    @GetMapping("rentingAuditView")
    public AjaxResult rentingAuditView(String cfContractId,Long id,String applyState,Integer jrProductType){
        System.out.println("11111111111"+cfContractId);
        System.out.println("***********"+id);
        System.out.println("----------"+applyState);
        System.out.println("+++++++++++++"+jrProductType);
        return AjaxResult.success();
    }

}
